filename = 'guest.txt'
with open (filename, 'w')as file_object:
    names = input('请输入你的名字：')
    file_object.write(names+"\n")